#ifndef _RULE_HELPER_H
#define _RULE_HELPER_H
struct IPRule * addIPRuleToChain(struct IPRule rule);
int delIPRuleFromChain(char name[]);
void* formAllIPRules(unsigned int *len);
bool matchOneRule(struct IPRule *rule, unsigned int sip, unsigned int dip, unsigned short sport, unsigned int dport, u_int8_t proto);
struct IPRule matchIPRules(struct sk_buff *skb, int *isMatch);
void getPort(struct sk_buff *skb, struct iphdr *hdr, unsigned short *src_port, unsigned short *dst_port);
bool isIPMatch(unsigned int ipl, unsigned int ipr, unsigned int mask) ;
void int_to_ip(unsigned int ip_int, char *ip_str);
#endif